package com.example.demo_mysql_mybatisplus.util.responce.results.filler;

import com.example.demo_mysql_mybatisplus.util.responce.results.filler.core.FillResponce;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 《2》
 * 方法上使用该注解，用于声明方法的返回结果需要填充数据
 *
 * @RestController
 * public class Controller {
 *
 *     @GetMapping("demo_1")
 *     @FillResponces({
 *             @FillResponce(target = AAA.class , by = "name", fillFields = "code,age" , useMethod = "getAAA"),
 *             @FillResponce(target = DDD.class , fillFields = "name,code" , useMethod = "getDDD"),
 *             @FillResponce(target = CCC.class , fillFields = "name,code" , useMethod = "getCCC"),
 *             @FillResponce(target = EEE.class , fillFields = "name,code,age,birthday" , useMethod = "getEEE"),
 *     })
 *     public Object demo_1(){
 *         return demoData2() ;
 *     }
 *
 * */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface FillResponces {
    FillResponce[] value();
}
